
<div id="maincolumn">

	<div style="overflow:hidden;">

	</div>

</div>


<script type="text/javascript">

	/**
	 * Panel toolbox
	 * Init the panel toolbox is mandatory !!! 
	 *
	 */
	ION.initToolbox('empty_toolbox');


	/**
	 * Options Accordion
	 *
	 */
	ION.initAccordion('.toggler', 'div.element', false, 'dashboardAccordion');


	// Articles edit
	var articles = ($$('#articleList .article')).append($$('#orphanArticlesList .article'));
	
	
	articles.each(function(item, idx)
	{
		item.addEvent('click', function(e){
			e.stop();
            ION.splitPanel({
                'urlMain': admin_url + 'article/edit/' + item.getProperty('rel'),
                'urlOptions': admin_url + 'article/get_options/' + item.getProperty('rel'),
                'title': Lang.get('ionize_title_edit_article') + ' : ' + item.get('text')
            });
		});

		// Make draggable to tree
		ION.addDragDrop(item, '.dropArticleInPage,.dropArticleAsLink,.folder', 'ION.dropArticleInPage,ION.dropArticleAsLink,ION.dropArticleInPage');
	});



	// Pages edit
	var pages = ($$('#articleList a.page')).append($$('#orphanPagesList a.page'));

	pages.each(function(item, idx)
	{
		var id = item.getProperty('rel');
		var title = item.get('text');
		
		item.addEvent('click', function(e){
			e.stop();
            ION.contentUpdate({
				'element': $('mainPanel'),
				'loadMethod': 'xhr',
				'url': admin_url + 'page/edit/'+id,'title': Lang.get('ionize_title_edit_page') + ' : ' + title});
		});
	});


	// Main Icons actions
	$('iconAddPage').addEvent('click', function(e){
		e.stop();
        ION.contentUpdate({
			element: $('mainPanel'),
			title: Lang.get('ionize_title_new_page'),
			url : admin_url + 'page/create/0'
		});
	});
	
	$('iconArticles').addEvent('click', function(e){
		e.stop();
        ION.contentUpdate({
			element: $('mainPanel'),
			title: Lang.get('ionize_title_articles'),
			url : admin_url + 'article/list_articles'		
		});
	});
	
	$('iconMediaManager').addEvent('click', function(e){
		e.stop();
        ION.contentUpdate({
			element: $('mainPanel'),
			title: Lang.get('ionize_menu_media_manager'),
			url : admin_url + 'media/get_media_manager',
			padding: {top:0, left:0, right:0}
		});
	});

	$('iconTranslation').addEvent('click', function(e){
		e.stop();
        ION.contentUpdate({
			element: $('mainPanel'),
			title: Lang.get('ionize_title_translation'),
			url : admin_url + 'translation/'
		});
	});
	
	$('iconGA').addEvent('click', function(e){
		e.stop();
		window.location.href = 'http://www.google.com/analytics/'
	});
	
	
	// Modules Icons actions
	$$('.desktopModuleIcon').each(function(item)
	{
		var a = item.getElement('a');
		var href = a.getProperty('href');
		var title = a.getProperty('title');
		
		item.addEvent('click', function(e){
            ION.contentUpdate({
				element: $('mainPanel'),
				title: title,
				url : ION.cleanUrl(href)
			});
		});
	});
	

</script>